package chap5.Task;
public class Task10 {
    public static void main(String[] args) {
        int[] a = {1, 2, 3, 4, 5, 6, 7, 8, 9};
        int[] b = {1, 2, 3, 4, 5, 6, 7, 8, 9};
        int i, j;
        boolean k = true;
        if (a.length == b.length) {
            for (i = 0, j = 0; i < a.length; i++, j++) {
                if (a[i] != b[j]) {
                    k = false;
                    break;
                }
            }
            if (k) {
                System.out.println("数组a和数组b相同");
            } else {
                System.out.println("数组a和数组b不相同");
            }
        } else {
            System.out.println("数组a和数组b不相同");
        }

    }
}
